-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci(root): Add Dockerfile and docker-compose #666
base: dev
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
@gurkanguray is attempting to deploy a commit to the kamp-us Team on Vercel. A member of the Team first needs to authorize it. |
TY so much for this. I'll take a look ASAP. |
@@ -0,0 +1,13 @@ | |||
NODE_ENV=development |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason we have an example env at the root. Since we have examples per folder that's good to move there where it matches
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was for the GitHub workflow testing purposes, and I will remove it in this PR.
https://github.com/marketplace/actions/create-env-file will handle the .env file creation at GitHub workflow for deployment purposes
WORKDIR /app | ||
COPY .gitignore .gitignore | ||
COPY --from=gql-prune /app/out/json . | ||
COPY --from=gql-prune /app/out/package-lock.json ./package-lock.json | ||
COPY /tsconfig.json tsconfig.json | ||
RUN npm install | ||
COPY --from=gql-prune /app/out/full/ . | ||
COPY --from=gql-prune /app/out/full/apps/gql/.env.example ./apps/gql/.env | ||
COPY .env ./apps/pasaport/.env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@usirin should we make a small script to do this on local as well seems like right now .env.example files can run the applications so local env can utilise this too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from what i read from the next.js docs, the best practice is to switch to a .env.development
file and commit that. then people can create a .env.local
file if they want to override anything from that files.
Good to know: .env, .env.development, and .env.production files should be included in your repository as they define defaults. .env*.local should be added to .gitignore, as those files are intended to be ignored. .env.local is where secrets can be stored.
https://nextjs.org/docs/app/building-your-application/configuring/environment-variables#default-environment-variables
|
||
# keep running | ||
CMD ["concurrently", "local-ssl-proxy --target 3000 --source 5000", "local-ssl-proxy --target 3001 --source 5001", "local-ssl-proxy --target 4000 --source 5002"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can turbo run these ? turbo has concurrent running capability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at this point we don't need turbo, we pruned everything, and i am not even sure if there is a turbo binary at this point. i think it's better to go with this.
@@ -3,8 +3,8 @@ version: "3.9" | |||
services: | |||
mysql: | |||
container_name: mysql | |||
image: mysql | |||
command: --default-authentication-plugin=mysql_native_password --skip-warnings | |||
image: mysql:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd say let's define a version so everytime it's the same mysql.
# healthcheck: # TODO: Add healthcheck for kampus | ||
# test: [ "CMD", "curl", "-f", "http://localhost:3000" ] | ||
# interval: 30s | ||
# timeout: 10s | ||
# retries: 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not used please remove
@@ -43,6 +43,7 @@ | |||
"prettier-plugin-tailwindcss": "0.3.0", | |||
"react": "18.2.0", | |||
"react-dom": "18.2.0", | |||
"sharp": "^0.32.5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not exact version and why we need this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was added according to the following doc: https://nextjs.org/docs/messages/install-sharp. However, when I researched it more(https://nextjs.org/docs/pages/building-your-application/optimizing/images), this package is needed for built-in image optimizations, not docker images.
It is a misunderstanding by me, and I will remove it 🙂
Description
Sharp
added as a new dependency. (ref: https://nextjs.org/docs/messages/install-sharp)Checklist
gguray
npx turbo run
at the root of the repository, and build was successful.npm install --save-exact <package>
so my package is pinned to a specific npm version. Leave empty if no package was installed. Leave empty if no package was installed with this PR.How were these changes tested?
Tested on local and GitHub workflow file added.